home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------------------------------------
- 3]PIXELIZER DOCS
- 3]V1.0
- 3](c) Copyright 1988, Christopher (Thumper) Halsall, All rights Reserved
- 3]Freely Distributable for non-profit only.
- 3]Published in JUMPDISK with author's permission
- ---------------------------------------------------------------------
-
- Pixelizer will take a non-HAM IFF picture of any displayable size,
- pixelize it to the pixel vertical and horizontal size given and save the
- picture out again.
- This program was written in six hours to solve a need that I had with
- an animation I was working on, and was not optimized at all for speed. If
- it's too slow for you, write me for the source.
- Thanks must go to Jim Kent, as I used his PD IFF code to load and save
- the IFF images, and production time would not have been as short if
- these were not available to me. THANKS!
- Oh, This software is offered "as is" with no representation of fitness
- for any particular purpose other than taking up disk space. The user
- assumes all risks and responsibilities related to its use, and my
- liabilities are limited to a red face and owing the person whose hard
- drive pixelizer managed to crash a beer at the pub of my choice.
- Sorry, my lawyer just dropped by to talk about the charges against me
- for doing lines of carrots in public, and commented in the lack of a
- disclaimer.
-
- Use:
-
- Pixelize SourcePicture DestinationPicture [PixelXSize [PixelYSize]]
-
- Where:
-
- SourcePicture is the IFF file you wish to pixelize.
-
- DestinationPicture is the file name under which you wish to save the
- pixelized image. DestinationPicture may be the same as SourcePicture if you
- wish to overwrite the original, or "nil:" if you don't want any output.
-
- PixelXSize is the width of the pixels to be created. Any size from 2 and
- up is valid. If this value is not given, 2 is used.
-
- PixelYSize is the height of the pixels to be created. Again, any size
- from 2 and up is valid. If this isn't given, PixelXSize is used for
- PixelYSize as well.
-
- Examples:
-
- "Pixelize ram:TestPicture ram:TestPicturePixelized 2 50"
-
- Loads TestPicture from ram:, creates pixels that are 2 pixels wide and
- 50 pixels high, and saves the file back to ram under the name of
- TestPicturePixelized.
-
- "Pixelize ram:TestPicture nil: 5000 5000"
-
- Loads TestPicture from ram:, creates pixels that are 5000 pixels square
- and delays five seconds; no output file is created. Please note that giving
- a pixel size as large as this simply fills the whole screen with the color
- that happens to be in the center of the screen. However, wild effects can be
- created by giving very large values for one dimension, and small values for
- the other.
-
- "Pixelize ram:TestPicture ram:TestPicture"
-
- Loads TestPicture from ram:, creates pixels that are 2 pixels square
- and saves the result back over TestPicture.
-
- "Pixelize ram:TestPicture"
-
- Loads TestPicture from ram:, creates pixels that are 2 pixels square,
- but doesn't produce any output file. When no output file is given, or "nil:"
- is given as the output file, Pixelize delays 5 seconds and then quits.
-
- 3]NOTES
- In this section, a Virtual Pixel is the rectangle of size PixelXSize
- wide by PixelYSize high which you specify, and a Real Pixel is a point on a
- screen which is the smallest possible, or a real pixel.
- The algorithm for this program guarantees there will always be a
- Virtual pixel in the exact center of the screen. Thus, if you have an
- animation sequence where you pixelize an image from small virtual pixels to
- large virtual pixels, it will appear as if the center virtual pixel grows.
- This effect is desirable.
- The color of the virtual pixel comes from the color of the real pixel
- at the center of the virtual pixel, rather than the upper left hand corner.
- Further, please be aware that this does NOT do pixel averaging, but simply
- takes the center real pixel of each virtual pixel, and makes it as large as
- the virtual pixel.
- As examples:
-
- Real pixels: Real Pixels:
- | |
- RRYYB RRRRR
- RRYYB RRRRR
- -RRRYY- Would produce a virtual pixel of: -RRRRR-
- RRRBB RRRRR
- RRRRR R=Red Y=Yellow B=Blue RRRRR
- | |
-
- This method of operation can at times be desirable, and at other times
- undesirable. I foresee a personal need for pixel averaging pixelization in
- the near future, so I will be adding it soon. Until then, if you have a big
- need for it, write or call and scream real loud.
- Also, if the center of the virtual pixel is in fact off screen,
- color 0 is used. This may not suit all situations, but it suited mine at the
- time. When the pixel-averaging algorithm is installed, border pixel cases
- will be handled properly (or differently, depending on your point of view.)
- Hold And Modify mode is not supported, as HAM is a rather bizarre thing
- to try to support, and I didn't have the need. Maybe someday, but not soon.
- Last, there is no Workbench support. It doesn't crash, but it doesn't do
- much either.
- Address: Christopher Halsall, Managing (Mangy) Programmer, LateNight
- Developments Corp., #202-306 Burnside Road West, Victoria, B.C., V8Z 1M1,
- Canada. Phone: (604) 380-3032.
-
- 4]END OF TEXT
-